import { ref, computed } from 'vue';
import { defineStore } from 'pinia';

export const userData = defineStore('userData', () => {
  const user = ref({
    email: '',
    id: '',
    motto: '',
    password: '',
    tel: null,
    type: 'user',
    updatedAt: '',
    url: '',
    username: '游客',
    phone: '',
    job: null,
    birthday: null,
    signature: null,
  });

  const localhostUrl = ref({
    map: 'guanggu_traffic',
    ip: 'localhost',
    port: '6163',
  });

  return { user, localhostUrl };
});
